﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FirstClassAssignment {
    class PrimeCal {
        private static bool IsPrime(int n) {
            if (n <= 1)
                return false;
            for (var i = 2; i * i <= n; i++) {
                if (n % i == 0)
                    return false;
            }
            return true;
        }

        public static string Factors(int n) {
            var result = "";
            for(var i = 2; i <= n; i++) {
                if (n % i == 0 && IsPrime(i))
                    result += i + " ";
            }
            return result;
        }

    }
}
